{extend name="public:layout" /}
{block name="content"}
<section class="Hui-article-box">
    <nav class="breadcrumb"><i class="Hui-iconfont"></i> <a href="/" class="maincolor">首页</a>
        <span class="c-999 en">&gt;</span>
        <span class="c-666">系统设置</span>
        <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
           href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a></nav>
    <div class="Hui-article">
        <article class="cl pd-20">
            <div class="row cl">
                <div style="float: right;padding:0 20px;">
                    <button onClick="submit1();" class="btn btn-primary radius" type="submit"><i
                            class="Hui-iconfont">&#xe632;</i> 保存
                    </button>
                    <button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
                </div>
            </div>
            <table class="table table-border table-bordered table-bg mt-20">
                <thead>
                <tr>
                    <th colspan="4" scope="col">服务器信息</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <th width="100">app地址</th>
                    <td><input type="text" name="app_host" class="inv-input" value="{$data.app_host|default=''}"></td>
                    <th width="100">web地址</th>
                    <td><input type="text" name="3" class="inv-input1" value=""></td>
                </tr>
                <tr>
                    <th width="100">测试</th>
                    <td><input type="text" name="1" class="inv-input1" value=""></td>
                    <th width="100"></th>
                    <td><input type="text" name="2" class="inv-input1" value=""></td>
                </tr>
                </tbody>
            </table>
            <input type="hidden" name="id" class="inv-input" value="{$data.id|default=''}">
        </article>

    </div>
</section>
{/block}
{block name='js'}
<script>
    function submit1() {
        debugger;
        var arr = {};
        $(".inv-input").each(function (r, t) {
            let name = $(t).attr('name');
            arr[name] = $(t).val();
        });
        console.log(arr);
        $.ajax1(this, '/set_up/save', 'post', arr, function (response) {
            $.mag('修改成功', 1, 3000);
        });
    }
</script>
{/block}

